$("api>entries>entry").each(function(index,item){
	var name = $(item).attr("name");
	var data = $.data(document);
	var type = $(item).attr("type");
	if(!data[type])
		data[type] = {};
	if(!data[type][name])
	{
		data[type][name] = [];
	}
	data[type][name].push(item);
});

var data = $.data(document);

var method = data.val;


/**
 * 2. Set the value of each element in the set of matched elements.<br>
 * &nbsp;&nbsp;&nbsp;&nbsp;<strong>Returns:</strong> <code>jQuery</code><br>
 * &nbsp;&nbsp;&nbsp;&nbsp;<strong><code>.val( value )</code></strong><br>
 * &nbsp;&nbsp;&nbsp;&nbsp;<strong>Parameters:</strong><br>
 * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>value</strong> A string of text or an array of strings to set as the value property of each matched element.<br>
 * &nbsp;&nbsp;&nbsp;&nbsp;<strong>Since:</strong> 1.0<br>
 * <br>
 */
console.debug("/**");
var j = 1;
for(var i = 0; i < method.length; i++)
{
	var entry = $(method[i]);
	if(entry.attr("type") == "selector") continue;
		//line 2
		var s = "";
		if(method.length > 1)
		{
			s += (j++) + ". ";
		}
		console.debug(" * " + s + entry.children("desc").text().replace(/</g, "&lt;").replace(/>/g, "&gt;") + "<br>");
		//line 3
		if(entry.attr("return"))
		{	
			console.debug(" * &nbsp;&nbsp;&nbsp;&nbsp;<strong>Returns:</strong> <code>" + entry.attr("return") + "</code><br>");
		}
		//line 4
		var signature = entry.find("signature");
		signature.each(function(index,item){
			var args = $("argument", item);
			var argArr = new Array();
			args.each(function(index,item){
				item = $(item);
				if(item.attr("optional") == "true")
				{
					argArr.push("[" + item.attr("name") + "]");
				}
				else
				{
					argArr.push(item.attr("name"));
				}
			});
			console.debug(" * &nbsp;&nbsp;&nbsp;&nbsp;<strong><code>." + entry.attr("name") + "(" + argArr.join(", ") + ")" + "</code></strong><br>");
			if(argArr.length > 0)
			{
				console.debug(" * &nbsp;&nbsp;&nbsp;&nbsp;<strong>Parameters:</strong><br>");
				args.each(function(index,item){
					console.debug(" * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>" + $(item).attr("name") + "</strong> " + $("desc",item).text().replace(/</g, "&lt;").replace(/>/g, "&gt;") + "<br>");
				});
			}
			console.debug(" * &nbsp;&nbsp;&nbsp;&nbsp;<strong>Since:</strong> " + $("added", item).text() + "<br>");
			console.debug(" * <br>");
		});
}
console.debug(" */");